/****************************************************
          File Name:7-1.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sat 20 Dec 2014 09:59:59 AM CST
*****************************************************/

#include<iostream>
using namespace std;

float cal(const float src1, const float src2)
{
    return (2.0 * src1 * src2 / (src1 + src2));
}

int main()
{
    float src1, src2;

    for(;;)
    {
        cout << "Enter two numbers: ";
        cin >> src1; if(src1 == float(0)) break;
        cin >> src2; if(src2 == float(0)) break;

        cout << "the compromising average number is: " << cal(src1, src2) << endl;
    }

    return 0;
}
